Skip to content

Say how the API key is stored and supplied, and stop saying every platform needs a secret - #35

Merged
leggetter merged 2 commits into
mainfrom
docs/credential-storage
Nov 5, 2026
Merged

leggetter merged 2 commits into
mainfrom
docs/credential-storage

Conversation

@leggetter

Copy link
Copy Markdown
Contributor

Closes #12, and corrects four docs pages that #33 made wrong.

#12: how the API key is stored, and the routes other than the editor

New subsection under Getting started → Credentials.

#12's central claim was wrong, so this doesn't follow it. The issue proposed saying "there is no environment-variable route to seeding the credential". I checked against n8n's source at n8n@2.44.6, and there is one:

  • CREDENTIALS_OVERWRITE_DATA (packages/@n8n/config/src/configs/credentials.config.ts): "JSON object of prefilled credential data (overwrites). End users cannot view or edit these values."
  • It never stores the value: applyOverwrite (packages/cli/src/credentials-overwrites.ts) fills a field only when the stored value is empty, and the overwrite isn't persisted to the credential.
  • The editor hides the field: useCredentialForm.ts filters out __overwrittenProperties. So every Hookdeck credential created in the editor gets that one key, and so one project. The docs say so.

What the section covers, and the source for each:

Route Where Source
External secrets, {{ $secrets.<vault-name>.<secret> }} Enterprise, Cloud and self-hosted n8n docs, Use external secret stores
Credential overwrites Self-hosted n8n source, above
Public API / n8n import:credentials Both public-api/v1/handlers/credentials, commands/import/credentials.ts
Not $env: blocked unless N8N_BLOCK_ENV_ACCESS_IN_NODE=false, which applies instance-wide Self-hosted only workflow-data-proxy-env-provider.ts (!== 'false')

dynamic-credentials.ee, which #12 asked about, looks like per-user credential resolution (an authorize endpoint and credential resolvers), not a way to supply an API key. I only read its config and file layout, not its behaviour.

Not verified by running n8n. All of this comes from n8n's source and docs. I haven't set CREDENTIALS_OVERWRITE_DATA against this node on a live instance.

Verification without a secret

Four places said verification needs a Webhook Secret: the README security model, Getting started, Security, and the trigger reference. #33 made the node switch verification on for AWS SNS and ShipStation, which Hookdeck verifies with keys it fetches itself, so each page now names that exception. Security also warns that a source of either type created some other way may not have verification on.

Out of scope

Security still says a configured source "looks identical to an unconfigured one", and that only a request's verified field shows whether a source verifies. Hookdeck core returns a top-level authenticated flag on sources, and #33's live test proved it for SNS and ShipStation. It isn't proven for secret-based platforms like Stripe, so I haven't touched that claim.

🤖 Generated with Claude Code

…tform needs a secret

Issue #12 asked for a note on how n8n stores the key and whether there is
a route other than pasting it into the editor, because that is the first
question a security review asks and the Cloud and self-hosted answers
differ. It proposed saying there is no environment-variable route. Checked
against n8n 2.44.6's source, there is one: CREDENTIALS_OVERWRITE_DATA fills
a credential field from the environment without storing it in the
credential, and the editor then hides that field. That pins every Hookdeck
credential made in the editor to one project, which the docs now say.

So Getting started lists what does work, with its catch: external secrets
($secrets, Enterprise on Cloud and self-hosted), credential overwrites on
self-hosted, and the public API or `n8n import:credentials` for scripted
setups. It also says why `$env` is not on the list: n8n 2.x blocks it unless
N8N_BLOCK_ENV_ACCESS_IN_NODE=false, which reopens environment access to
every node on the instance, and Cloud has no environment to read.

Separately, four places told users verification needs a Webhook Secret. That
stopped being true when #33 had the node switch verification on for AWS SNS
and ShipStation, which Hookdeck verifies with keys it fetches itself. The
README security model, Getting started, Security and the trigger reference
now name the exception.

Closes #12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leggetter added a commit that referenced this pull request Nov 5, 2026
`lts/*` now resolves to Node 26, where `npm ci` fails compiling
isolated-vm 6.2.0, a dev dependency that @n8n/expression-runtime
pulls in. Every workflow installs with `npm ci`, so CI, Integration,
Source type drift and Publish all break: the 2 Nov drift run and
#35's build re-run on 5 Nov both failed there.

Node 24 is the previous LTS and ships npm 11.19, so publish.yml's
OIDC guard (npm >= 11.5.1) still passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leggetter
leggetter merged commit cb510bd into main Nov 5, 2026
2 checks passed
@leggetter leggetter mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README: document how the API key is stored, and that there is no env-var route

1 participant